package com.heimdallr.rbac.permission.dao;

import com.heimdallr.rbac.permission.entity.GroupEntity;
import com.heimdallr.rbac.permission.entity.MenuEntity;
import com.heimdallr.rbac.permission.entity.PermissionEntity;
import com.heimdallr.rbac.permission.entity.RoleEntity;

import java.util.List;
import java.util.Map;

public interface PermissionDao {


    /**
     *
     * @param paraMap
     * @return
     */
    List<PermissionEntity> getPermissionListForPage(Map<String, String> paraMap);

    boolean saveGroupEntity(GroupEntity entity);

    PermissionEntity getPermissionEntityById(int id);

    boolean savePermissionEntity(PermissionEntity entity);

    List<PermissionEntity> getAllPermissionEntity();


    /**
     *
     * @param paraMap
     * @return
     */
    List<RoleEntity> getRoleListForPage(Map<String, String> paraMap);


    boolean saveRoleEntity(RoleEntity entity);

    RoleEntity getRoleEntityById(int id);


    List<RoleEntity> getAllRoles();

    /**
     *
     * @param id
     * @return
     */
    MenuEntity getMenuEntityById(int id);

    List<MenuEntity> getAllMenuList();


    boolean saveMenuEntity(MenuEntity entity);
}
